import 'package:flutter/material.dart';


@Deprecated(
    "该组件已弃用，影响滑动模块的设计"
)
class CommendPage extends StatelessWidget {
  const CommendPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      children: [
        SizedBox(
          height: 15,
        ),
        Text(
          "热门搜索：",
          style: TextStyle(color: Colors.black87, fontSize: 20),
        ),
        SizedBox(
          height: 20,
        ),
        Chip_items(),
        SizedBox(
          height: 15,
        ),
        Text(
          "历史记录：",
          style: TextStyle(color: Colors.black87, fontSize: 20),
        ),
        SizedBox(
          height: 20,
        ),
        Chip_items()
      ],
    );
  }
}

class Chip_items extends StatelessWidget {
  const Chip_items({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Wrap(
      spacing: 8.0,
      runSpacing: 8.0,
      children: <Widget>[
        new Chip(
          avatar:
          new CircleAvatar(backgroundColor: Colors.blue, child: Text("1")),
          label: Text("可乐罐"),
        ),
        new Chip(
          avatar:
          new CircleAvatar(backgroundColor: Colors.blue, child: Text("2")),
          label: Text("香蕉皮"),
        ),
        new Chip(
          avatar:
          new CircleAvatar(backgroundColor: Colors.blue, child: Text("3")),
          label: Text("废弃报纸"),
        ),
        new Chip(
          avatar:
          new CircleAvatar(backgroundColor: Colors.blue, child: Text("4")),
          label: Text("废弃旧电池"),
        ),
        new Chip(
          avatar:
          new CircleAvatar(backgroundColor: Colors.blue, child: Text("5")),
          label: Text("矿泉水瓶"),
        ),
        new Chip(
          avatar:
          new CircleAvatar(backgroundColor: Colors.blue, child: Text("6")),
          label: Text("塑料吸管"),
        ),
      ],
    );
  }
}
